Page({
  data: {
    dialogvisible: false,
    
  },
 
  showDialog: function() {
    this.setData({
      dialogvisible: true
    })
  },
  closeDialog: function() {
    this.setData({
      dialogvisible: false
    })
    // this._toast('关闭')
  },
  confirm: function() {
    console.log("确定")
    this._toast('confirm')
  },
  cancel: function() {
    console.log("取消")
    this.closeDialog()
    this._toast('cancel')
  },
  
  _toast(msg) {
    wx.showToast({
      title: msg,
      icon: 'none',
      duration: 2000
    })
  }
})
